# Maintainer:  Martin Wimpress <code@flexion.org>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Dirk Berg <berg1981@googlemail.com>

pkgname=libaacs
pkgver=0.11.1
pkgrel=2
pkgdesc="Advanced Access Content System"
arch=('loong64' 'x86_64')
license=('LGPL')
url="https://www.videolan.org/developers/libaacs.html"
options=(debug)
depends=('libgcrypt')
source=("ftp://ftp.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('42dcba5fd593c9a8ec7af11251006b083ad2c49ec198734d1d66f67c2ded4557d77617600edbf0c5250e9b0407ef9a2f906d59d154bda8ecfc8adfd234fb2c42')

build() {
    cd "${pkgname}-${pkgver}"
    ./bootstrap
    ./configure --prefix=/usr
    make
}

package() {
    cd "${pkgname}-${pkgver}"
    make DESTDIR="${pkgdir}" install
    install -Dm644 KEYDB.cfg "${pkgdir}/usr/share/doc/${pkgname}"/KEYDB.cfg
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}"/README.md
}
